package com.hjy.core.transport.netty;

import com.hjy.api.HelloObject;
import com.hjy.api.HelloService;
import com.hjy.common.utils.RpcUtils;
import com.hjy.core.nacos.NacosServiceRegistry;
import com.hjy.core.serializer.KryoSerializer;
import com.hjy.core.transport.RpcClient;
import com.hjy.core.transport.RpcClientProxy;
import com.hjy.core.transport.netty.client.NettyClient;

public class TestClient {
    public static void main(String[] args) {
//        RpcClient client = new NettyClient(new KryoSerializer());
//        RpcClientProxy proxy = new RpcClientProxy(client);
//        HelloService helloService = proxy.getProxy(HelloService.class);
        HelloService helloService = RpcUtils.getProxyObjetNetty(HelloService.class);
        HelloObject object = new HelloObject(12, "This is a message");
        String res = helloService.sayHello(object);
        System.out.println(res);
    }
}
